import pandas as pd


def save_to_excel(item_list: list):
    """
    将 Item 列表写入 Excel 文件中
    :param item_list: Item 列表
    :return: None
    """
    df_dict = {
        'school_name': [],
        'school_location': [],
        'school_tel': [],
        'school_master': [],
        'school_type': [],
        'school_url': []
    }
    for school_item in item_list:
        df_dict['school_name'].append(school_item['school_name'])
        df_dict['school_location'].append(school_item['school_location'])
        df_dict['school_tel'].append(school_item['school_tel'])
        df_dict['school_master'].append(school_item['school_master'])
        df_dict['school_type'].append(school_item['school_type'])
        df_dict['school_url'].append(school_item['school_url'])

    df: pd.DataFrame = pd.DataFrame(df_dict)
    df.to_excel('result.xlsx')
